package com.ruoyi.fun.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fun.mapper.EcLogisticsTrackMapper;
import com.ruoyi.fun.domain.EcLogisticsTrack;
import com.ruoyi.fun.service.IEcLogisticsTrackService;

/**
 * 物流轨迹Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-06
 */
@Service
public class EcLogisticsTrackServiceImpl implements IEcLogisticsTrackService 
{
    @Autowired
    private EcLogisticsTrackMapper ecLogisticsTrackMapper;

    /**
     * 查询物流轨迹
     * 
     * @param trackId 物流轨迹主键
     * @return 物流轨迹
     */
    @Override
    public EcLogisticsTrack selectEcLogisticsTrackByTrackId(Long trackId)
    {
        return ecLogisticsTrackMapper.selectEcLogisticsTrackByTrackId(trackId);
    }

    /**
     * 查询物流轨迹列表
     * 
     * @param ecLogisticsTrack 物流轨迹
     * @return 物流轨迹
     */
    @Override
    public List<EcLogisticsTrack> selectEcLogisticsTrackList(EcLogisticsTrack ecLogisticsTrack)
    {
        return ecLogisticsTrackMapper.selectEcLogisticsTrackList(ecLogisticsTrack);
    }

    /**
     * 新增物流轨迹
     * 
     * @param ecLogisticsTrack 物流轨迹
     * @return 结果
     */
    @Override
    public int insertEcLogisticsTrack(EcLogisticsTrack ecLogisticsTrack)
    {
        ecLogisticsTrack.setCreateTime(DateUtils.getNowDate());
        return ecLogisticsTrackMapper.insertEcLogisticsTrack(ecLogisticsTrack);
    }

    /**
     * 修改物流轨迹
     * 
     * @param ecLogisticsTrack 物流轨迹
     * @return 结果
     */
    @Override
    public int updateEcLogisticsTrack(EcLogisticsTrack ecLogisticsTrack)
    {
        return ecLogisticsTrackMapper.updateEcLogisticsTrack(ecLogisticsTrack);
    }

    /**
     * 批量删除物流轨迹
     * 
     * @param trackIds 需要删除的物流轨迹主键
     * @return 结果
     */
    @Override
    public int deleteEcLogisticsTrackByTrackIds(Long[] trackIds)
    {
        return ecLogisticsTrackMapper.deleteEcLogisticsTrackByTrackIds(trackIds);
    }

    /**
     * 删除物流轨迹信息
     * 
     * @param trackId 物流轨迹主键
     * @return 结果
     */
    @Override
    public int deleteEcLogisticsTrackByTrackId(Long trackId)
    {
        return ecLogisticsTrackMapper.deleteEcLogisticsTrackByTrackId(trackId);
    }

    /**
     * 根据trackId和组织ID查询LogisticsTrack
     * 
     * @param trackId LogisticsTrack主键
     * @param orgId 组织ID
     * @return LogisticsTrack
     */
    @Override
    public EcLogisticsTrack selectEcLogisticsTrackByTrackIdAndOrgId(Long trackId, Long orgId)
    {
        return ecLogisticsTrackMapper.selectEcLogisticsTrackByTrackIdAndOrgId(trackId, orgId);
    }

    /**
     * 根据组织ID查询LogisticsTrack列表
     * 
     * @param eclogisticstrack LogisticsTrack
     * @param orgId 组织ID
     * @return LogisticsTrack集合
     */
    @Override
    public List<EcLogisticsTrack> selectEcLogisticsTrackListByOrgId(EcLogisticsTrack eclogisticstrack, Long orgId)
    {
        return ecLogisticsTrackMapper.selectEcLogisticsTrackListByOrgId(eclogisticstrack, orgId);
    }
}